<template>
  <div class="goods">
    <div class="goods-items" v-bind:class="{ checked: isChecked }" @click="$emit('selectValue', value)">
      <div class="total service">
          <div>
              <div class="service__quantity">
                <div class="service-logo"></div>
                <span class="service-num">{{ value }}</span>
              </div>
              <div class="service-gift">
              </div>
          </div>
      </div>
      <div class="relative-to-total">
        <!-- <el-radio v-model='selectedValue' @change='selectedChange' :label='value'> -->
          <em class="money">{{ value }}</em>
          <span class="unit">元</span>
        <!-- </el-radio> -->
        
      </div>
      <i class="icon-corner-checked"></i>

    </div>
  </div>
  
</template>

<script>
  export default {
    props: ['value', 'selected'],
    data () {
      return {
        isChecked: this.selected
      }
    },
    created () {
  
    },
    mounted () {
    },
    computed: {
    },
    methods: {
    }
  }
</script>

<style lang="less" scoped>
  @import '../style/mixin';
  .goods {
    text-align: center;
  }
  .goods-items {
    width: 148px;
    height: 158px;
    border: 1px solid #dcdcdc;
    position: relative;
  }

  .goods-items.checked, .goods-items:hover {
    border: 1px solid #F4450C;
  }
  .total {
    margin: 0 1px;
    padding-top: 36px;
    height: 112px;
    border-bottom: 1px solid #dcdcdc;
    box-sizing: border-box;

    display: flex;
    justify-content: center;
  }

  .goods-items .service-logo {
    width: 24px;
    height: 21px;
    // vertical-align: top;
    background-image: url(../assets/icon/jifen.png);
    // objet-fit: contain;
    // display: inline-block;
    margin-bottom: 10px;

  }

  .goods-items .service-num {
    font-size: 14px;
    color: #555;
    // vertical-align: baseline;
  }

  .goods-items .service-gift {
    margin-top: 6px;
    position: relative;
    color: #7f7f7f;
  }

  // .goods.style-ser-center .relative-to-total {
  //   height: 32px;
  //   line-height: 32px;
  //   position: relative;
  // }
  .goods-items.checked .relative-to-total {
    color: #F4450C;
  }

  .goods-items .relative-to-total {
    position: relative;
    font-size: 16px;
    font-weight: bold;
    color: #222;
    height: 46px;
    line-height: 46px;
  }

  .goods-items.checked .icon-corner-checked {
    display: block;
  }

  .goods-items .icon-corner-checked {
    position: absolute;
    right: 0;
    top: 0;
    display: none;
  }

  .icon-corner-checked {
    // background-image: url(../assets/img/paySelected.png);
    width: 25px;
    height: 25px;
  }
  
</style>
